import java.util.Scanner;

/**
 * 倒置字符串
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        //System.out.println(s);
        StringDown(s);
    }

    private static void StringDown(String s) {
        String[] strings = s.split(" ");
        String[] newString = new String[strings.length];
        int index = 0;
        for (int i = strings.length - 1; i >= 0 ; i--) {
            newString[index++] = strings[i];
        }
        for (int i = 0; i < newString.length; i++) {
            System.out.print(newString[i]+" ");
        }
    }
}
